//
//  LoginViewController.h
//  VKChat
//
//  Created by Максим Бризинский on 23.01.11.
//  Copyright 2011 БГУИР. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#include "VKAuth.h"
#include "VKApi.h"
#include "Roster.h"


@interface LoginViewController : NSObject<VKAuthDelegate, VKApiMessageDelegate> {
	IBOutlet WebView* _webView;
	IBOutlet NSButton* _loginButton;
	IBOutlet NSTextField* _messageField;
	IBOutlet NSTextField* _toUser;
	IBOutlet NSTextField* _statusField;
	IBOutlet NSButton* _setStatusButton;
	IBOutlet NSButton* _sendMessageButton;
	IBOutlet NSButton* _getLongPollServerButton;
	VKApi *vkApi;
	
	NSArray* users;
	Roster* _roster;
}
-(IBAction) loginButtonClick:(id)sender;
-(IBAction) sendMessage:(id)sender;
-(IBAction) setStatus:(id)sender;
-(IBAction) serverButton:(id)sender;

-(void)asyncSendMessage:(NSArray*)arg;
/* VKAuthDelegate Methods */
-(void)vkAuthDidFail;
-(void)vkAuthDidSuccess:(VKSessionInfo)session;

/* VKApiDelegate Methods */
-(void)didReceiveMessage:(NSString *)message fromUid:(long)uid;
@end
